package asia.lxq.cic.controller;

import asia.lxq.cic.config.GlobalConfig;
import asia.lxq.cic.entity.Result;
import asia.lxq.cic.entity.User;
import asia.lxq.cic.service.GroupService;
import asia.lxq.cic.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/group")
public class GroupController {

    @Autowired
    GroupService groupService;
    @Autowired
    RedisUtil redisUtil;

    @GetMapping("/group_search")
    public Result<Object> searchGroup(String groupName, int collegeId){
        return groupService.searchGroupByName(collegeId, groupName);
    }
}
